package com.an.cloud.apis;

import com.an.cloud.resp.ResultData;
import com.an.cloud.resp.ReturnCodeEnum;
import org.springframework.stereotype.Component;

/**
 * 支付假装哨兵API回落
 *
 * @author: ANHE
 * @createDate: 2024/03/22
 * @version: 1.0.0
 */
@Component
public class PayFeignSentinelApiFallBack implements PayFeignSentinelApi {
    /**
     * 按订单号付款
     *
     * @param orderNo 订单没有
     * @return {@link ResultData }
     * @author: ANHE
     * @createDate: 2024/03/22
     * @version: 1.0.0
     */
    @Override
    public ResultData getPayByOrderNo(String orderNo) {
        return ResultData.fail(ReturnCodeEnum.RC500.getCode(), "对方服务宕机或不可用，FallBack服务降级o(╥﹏╥)o");
    }
}